/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.esoft;

import java.util.HashMap;
import java.util.Map;
import org.restlet.Restlet;
import org.restlet.Router;

/**
 *
 * @author odpsoft
 */
public class RestletMapperBean {

    private Map<String, Restlet> resourceMappings = new HashMap<String, Restlet>();

    public void init(Router router) {
        for (String key : resourceMappings.keySet()) {
            router.attach(key, resourceMappings.get(key));
        }
            router.attach("/users/{username}",HelloWorldResource.class); 
    }

    public void setResourceMappings(HashMap<String, Restlet> resourceMappings) {
        this.resourceMappings = resourceMappings;
    }
}
